// 头部 搜索栏 div:head
let headUlobj = document.querySelector(".screen ul")
let headLiobj = document.querySelectorAll(".screen ul li");   //head 里的 li标签
let t;
t = headLiobj[0].innerHTML;

headLiobj.forEach((element, index) => {
    // 鼠标移入移出，点击切换
    headUlobj.onmouseover = function () {
        headLiobj.forEach((element, index) => {
            element.style.display = "block"
        })
    }
    headUlobj.onmouseout = function () {
        headLiobj.forEach((element, index) => {
            element.style.display = "none"
        })
        headLiobj[0].style.display = "block"
    }
    element.onclick = function () {
        headLiobj[0].innerHTML = element.innerHTML;
        element.innerHTML = t;
        t = headLiobj[0].innerHTML;
    }
});


